/**
 * @file ai_chat_frame.h
 * @brief AI Chat Window Frame
 * @author AI Assistant
 * @date 2025-10-13
 */

#ifndef AI_CHAT_FRAME_H
#define AI_CHAT_FRAME_H

#include <wx/wx.h>
#include <wx/textctrl.h>
#include <wx/button.h>
#include <wx/sizer.h>
#include <wx/listctrl.h>
#include <vector>
#include <string>

class AIChatFrame : public wxFrame
{
public:
    AIChatFrame(const wxString& title);
    ~AIChatFrame();

private:
    // UI Controls
    wxTextCtrl* m_chatDisplay;
    wxTextCtrl* m_inputText;
    wxButton* m_sendButton;
    wxButton* m_clearButton;
    wxListCtrl* m_userList;
    wxChoice* m_terminalChoice;
    
    // Data
    std::vector<wxString> m_conversationHistory;
    
    // Event Handlers
    void OnSendMessage(wxCommandEvent& event);
    void OnClearChat(wxCommandEvent& event);
    void OnInputEnter(wxCommandEvent& event);
    void OnClose(wxCloseEvent& event);
    
    // Methods
    void CreateControls();
    void SetupLayout();
    void AddMessage(const wxString& sender, const wxString& message, const wxColour& color = wxColour(0, 0, 0));
    void ProcessAIMessage(const wxString& message);
    void ExecuteComputerCommand(const wxString& command);
    
    wxDECLARE_EVENT_TABLE();
};

class AIChatApp : public wxApp
{
public:
    virtual bool OnInit() override;
    virtual int OnExit() override;
    
private:
    AIChatFrame* m_frame;
};

#endif // AI_CHAT_FRAME_H
